import request from '@/utils/request';
import api from '@/common/api';

export async function query(params, targetKey) {
  return request(api[`${targetKey}Query`].url, {
    method: 'POST',
    data: params,
  });
}

export async function submit(params, targetKey) {
  return request(api[`${targetKey}Submit`].url, {
    method: 'POST',
    data: params,
  });
}

export async function remove(params, targetKey) {
  return request(api[`${targetKey}Remove`].url, {
    method: 'POST',
    data: params,
  });
}
